package cn.zh.planmanager.application.service.impl;

import cn.zh.planmanager.application.bo.PlanBO;
import cn.zh.planmanager.application.convert.PlanBOConvert;
import cn.zh.planmanager.application.service.PlanApplicationService;
import cn.zh.planmanager.domain.plan.model.entity.Plan;
import cn.zh.planmanager.domain.plan.service.PlanService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author zh
 */
@Service
@RequiredArgsConstructor
public class PlanApplicationServiceImpl implements PlanApplicationService {

    private final PlanService planService;

    @Override
    public PlanBO findById(Long id) {
        Plan plan = planService.findPlanById(id);
        return PlanBOConvert.convertToBO(plan);
    }
}
